<%@page contentType="text/html; charset=UTF-8" session="false" %>
<%@include  file="/WEB-INF/jspf/import.jspf"%>
<div class="pageContent">
    <form method="post" action="${ROOT}/admin/dev/verifyClubVip.do" 
          class="pageForm required-validate" onsubmit="return check(this, navTabAjaxDone)">
        <div class="pageFormContent" layoutH="56">
            <fieldset id="webContent">
                <legend>校验车友会车主认证人数</legend>
                <dl class="nowrap">
                    <dt>校验类型:</dt>
                    <dd><input class="radio required" value="1"  name="type"  type="radio" onclick="selectClubId()"/>所有车友会&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="radio required" value="2" maxlength="30" name="type"  type="radio" checked="checked" onclick="selectClubId()" />指定车友会</dd>
                </dl>
                <dl class="nowrap" id="clubIdDiv">
                    <dt>车友会ID:</dt>
                    <dd><input class="textInput" name="clubId"  type="input" id="clubId"/></dd>
                </dl>
            </fieldset>

        </div>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">校验</button></div></div></li>
                <li><div class="button"><div class="buttonContent"><button class="close" type="button">关闭</button></div></div></li>
            </ul>
        </div>
    </form>
</div>
<script type="text/javascript">
    function selectClubId(){
        var v = $("input:radio[name='type']:checked").val();
        if(v==2){
            $("#clubIdDiv").show();
        }else{
            $("#clubIdDiv").hide(); 
        }
    }
    function check(frm,navabAjaxDone){
        var v = $("input:radio[name='type']:checked").val();
        if(v==2){
            var clubId = $("#clubId").val();
            if(clubId==null || clubId=="" || clubId==0 || clubId==undefined){
                alertMsg.error("请输入正确的车友会ID");
                return false;
            }
        }
        if (!validateCallback(frm, navTabAjaxDone)) {
                return false;
            }
        return true;
    }
</script>